<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title>GeodesicProj(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body>



<h1 id="NAME">NAME</h1>

<p>GeodesicProj -- perform projections based on geodesics</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<p><b>GeodesicProj</b> ( <b>-z</b> | <b>-c</b> | <b>-g</b> ) <i>lat0</i> <i>lon0</i> [ <b>-r</b> ] [ <b>-e</b> <i>a</i> <i>f</i> ] [ <b>-w</b> ] [ <b>-p</b> <i>prec</i> ] [ <b>--comment-delimiter</b> <i>commentdelim</i> ] [ <b>--version</b> | <b>-h</b> | <b>--help</b> ] [ <b>--input-file</b> <i>infile</i> | <b>--input-string</b> <i>instring</i> ] [ <b>--line-separator</b> <i>linesep</i> ] [ <b>--output-file</b> <i>outfile</i> ]</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Perform projections based on geodesics. Convert geodetic coordinates to either azimuthal equidistant, Cassini-Soldner, or gnomonic coordinates. The center of the projection (<i>lat0</i>, <i>lon0</i>) is specified by either the <b>-c</b> option (for Cassini-Soldner), the <b>-z</b> option (for azimuthal equidistant), or the <b>-g</b> option (for gnomonic). At least one of these options must be given (the last one given is used).</p>

<p>Geodetic coordinates are provided on standard input as a set of lines containing (blank separated) <i>latitude</i> and <i>longitude</i> (decimal degrees or degrees, minutes, seconds); for details on the allowed formats for latitude and longitude, see the <code>GEOGRAPHIC COORDINATES</code> section of GeoConvert(1). For each set of geodetic coordinates, the corresponding projected coordinates <i>x</i>, <i>y</i> (meters) are printed on standard output together with the azimuth <i>azi</i> (degrees) and reciprocal scale <i>rk</i>. For Cassini-Soldner, <i>azi</i> is the bearing of the easting direction and the scale in the easting direction is 1 and the scale in the northing direction is 1/<i>rk</i>. For azimuthal equidistant and gnomonic, <i>azi</i> is the bearing of the radial direction and the scale in the azimuthal direction is 1/<i>rk</i>. For azimuthal equidistant and gnomonic, the scales in the radial direction are 1 and 1/<i>rk</i>^2, respectively.</p>

<h1 id="OPTIONS">OPTIONS</h1>

<dl>

<dt id="z-lat0-lon0"><b>-z</b> <i>lat0</i> <i>lon0</i></dt>
<dd>

<p>use the azimuthal equidistant projection centered at latitude = <i>lat0</i>, longitude = <i>lon0</i>. The <b>-w</b> flag can be used to swap the default order of the 2 coordinates, provided that it appears before <b>-z</b>.</p>

</dd>
<dt id="c-lat0-lon0"><b>-c</b> <i>lat0</i> <i>lon0</i></dt>
<dd>

<p>use the Cassini-Soldner projection centered at latitude = <i>lat0</i>, longitude = <i>lon0</i>. The <b>-w</b> flag can be used to swap the default order of the 2 coordinates, provided that it appears before <b>-c</b>.</p>

</dd>
<dt id="g-lat0-lon0"><b>-g</b> <i>lat0</i> <i>lon0</i></dt>
<dd>

<p>use the ellipsoidal gnomonic projection centered at latitude = <i>lat0</i>, longitude = <i>lon0</i>. The <b>-w</b> flag can be used to swap the default order of the 2 coordinates, provided that it appears before <b>-g</b>.</p>

</dd>
<dt id="r"><b>-r</b></dt>
<dd>

<p>perform the reverse projection. <i>x</i> and <i>y</i> are given on standard input and each line of standard output gives <i>latitude</i>, <i>longitude</i>, <i>azi</i>, and <i>rk</i>.</p>

</dd>
<dt id="e-a-f"><b>-e</b> <i>a</i> <i>f</i></dt>
<dd>

<p>specify the ellipsoid via the equatorial radius, <i>a</i> and the flattening, <i>f</i>. Setting <i>f</i> = 0 results in a sphere. Specify <i>f</i> &lt; 0 for a prolate ellipsoid. A simple fraction, e.g., 1/297, is allowed for <i>f</i>. By default, the WGS84 ellipsoid is used, <i>a</i> = 6378137 m, <i>f</i> = 1/298.257223563.</p>

</dd>
<dt id="w"><b>-w</b></dt>
<dd>

<p>toggle the longitude first flag (it starts off); if the flag is on, then on input and output, longitude precedes latitude (except that, on input, this can be overridden by a hemisphere designator, <i>N</i>, <i>S</i>, <i>E</i>, <i>W</i>).</p>

</dd>
<dt id="p-prec"><b>-p</b> <i>prec</i></dt>
<dd>

<p>set the output precision to <i>prec</i> (default 6). <i>prec</i> is the number of digits after the decimal point for lengths (in meters). For latitudes, longitudes, and azimuths (in degrees), the number of digits after the decimal point is <i>prec</i> + 5. For the scale, the number of digits after the decimal point is <i>prec</i> + 6.</p>

</dd>
<dt id="comment-delimiter-commentdelim"><b>--comment-delimiter</b> <i>commentdelim</i></dt>
<dd>

<p>set the comment delimiter to <i>commentdelim</i> (e.g., &quot;#&quot; or &quot;//&quot;). If set, the input lines will be scanned for this delimiter and, if found, the delimiter and the rest of the line will be removed prior to processing and subsequently appended to the output line (separated by a space).</p>

</dd>
<dt id="version"><b>--version</b></dt>
<dd>

<p>print version and exit.</p>

</dd>
<dt id="h"><b>-h</b></dt>
<dd>

<p>print usage and exit.</p>

</dd>
<dt id="help"><b>--help</b></dt>
<dd>

<p>print full documentation and exit.</p>

</dd>
<dt id="input-file-infile"><b>--input-file</b> <i>infile</i></dt>
<dd>

<p>read input from the file <i>infile</i> instead of from standard input; a file name of &quot;-&quot; stands for standard input.</p>

</dd>
<dt id="input-string-instring"><b>--input-string</b> <i>instring</i></dt>
<dd>

<p>read input from the string <i>instring</i> instead of from standard input. All occurrences of the line separator character (default is a semicolon) in <i>instring</i> are converted to newlines before the reading begins.</p>

</dd>
<dt id="line-separator-linesep"><b>--line-separator</b> <i>linesep</i></dt>
<dd>

<p>set the line separator character to <i>linesep</i>. By default this is a semicolon.</p>

</dd>
<dt id="output-file-outfile"><b>--output-file</b> <i>outfile</i></dt>
<dd>

<p>write output to the file <i>outfile</i> instead of to standard output; a file name of &quot;-&quot; stands for standard output.</p>

</dd>
</dl>

<h1 id="EXAMPLES">EXAMPLES</h1>

<pre><code>   echo 48.648 -2.007 | GeodesicProj -c 48.836 2.337
   =&gt; -319919 -11791 86.7 0.999
   echo -319919 -11791 | GeodesicProj -c 48.836 2.337 -r
   =&gt; 48.648 -2.007 86.7 0.999</code></pre>

<h1 id="ERRORS">ERRORS</h1>

<p>An illegal line of input will print an error message to standard output beginning with <code>ERROR:</code> and causes <b>GeodesicProj</b> to return an exit code of 1. However, an error does not cause <b>GeodesicProj</b> to terminate; following lines will be converted.</p>

<h1 id="SEE-ALSO">SEE ALSO</h1>

<p>The ellipsoidal gnomonic projection is derived in Section 8 of C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI <a href="https://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">https://geographiclib.sourceforge.io/geod-addenda.html</a>.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p><b>GeodesicProj</b> was written by Charles Karney.</p>

<h1 id="HISTORY">HISTORY</h1>

<p><b>GeodesicProj</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-08. Prior to version 1.9 it was called EquidistantTest.</p>


</body>

</html>


